<template>
  <div>
    <Detail :detailForm="detailForm"></Detail>
  </div>
</template>

<script setup>
import tablePaging from '@/views/common/component/table-paging'
import Detail from  '@/views/common/component/detail'
import { onMounted, reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import {getStudentDetail} from '@/api/student'
import {useRoute} from 'vue-router/dist/vue-router'
const { proxy } = getCurrentInstance();
const router = useRouter()
const route = useRoute()
const detailForm = reactive({
  column:[
    {
      name:'用户名',
      code: 'name',
      span: 6
    },
    {
      name:'身份证号',
      code: 'idCard',
      span: 6
    },
    {
      name:'性别',
      span: 6,
      formatter: (row)=>{
        return row.gender == 1? '男' : '女'
      }
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'企业',
      code: 'companyName',
      span: 6
    },
    {
      name:'所在省份',
      code: 'realRegionName',
      span: 6
    },
    {
      name:'意向考试',
      code: 'intentionalExam',
      span: 6
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'学历',
      code: 'academic',
      span: 6
    },
    {
      name:'手机号码',
      code: 'mobile',
      span: 6
    },
    {
      name:'工作年限',
      span: 6,
      formatter: (row)=>{
        return row.workYears + '年'
      }
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'毕业时间',
      code: 'graduationTime',
      span: 6
    },
    {
      name:'注册时间',
      code: 'registerTime',
      span: 6
    },
    {
      name:'注册来源',
      code: 'registerSource',
      span: 6
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'专业',
      code: 'schoolProfession',
      span: 6
    },
    {
      name:'邮箱',
      code: 'email',
      span: 6
    },
    {
      name:'状态',
      span: 6,
      formatter: (row)=>{
        return row.disableFlag == 1? '禁用' : '启用'
      }
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'是否添加微信',
      span: 6,
    },
    {
      name:'销售',
      code: 'saleName',
      span: 6
    },
    {
      name:'客服',
      code: 'serverName',
      span: 6
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'最近登录时间',
      code: 'lastLoginTime',
      span: 6
    },
    {
      name:'是否绑定微信',
      span: 6,
      formatter: (row)=>{
        return row.wxId? '是' : '否'
      }
    },
    {
      name:'是否企业用户',
      span: 6,
      formatter: (row)=>{
        return row.companyId? '是' : '否'
      }
    },
    {
      isSpace: true,
      span: 6
    },
    {
      name:'备注',
      span: 16,
      code: 'remark',
      style: 'width: 170px'
    },
  ],
  data: {},
  hasEdit: false
})
const initInfo = () => {
  getStudentDetail(route.query.id || '').then((res) => {
    detailForm.data = res.data
  })
}

onMounted(() => {
  initInfo()
})
</script>

<style></style>
